package com.eastfair.common.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.pay.dto.PaymentRecordDTO;
import com.eastfair.pay.dto.PaymentRecordPageQuery;
import com.eastfair.pay.dto.PaymentRecordSaveDTO;
import com.eastfair.pay.dto.PaymentRecordUpdateDTO;
import com.eastfair.pay.vo.PaymentRecordVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;

@FeignClient(value = "mice-pay/paymentRecord")
public interface PaymentRecordFeign {

    @PostMapping
    R save(@Validated @RequestBody PaymentRecordSaveDTO paymentRecordSaveDTO);

    @PostMapping("/updatePaymentRecord")
    R update(@Validated @RequestBody PaymentRecordUpdateDTO paymentRecordUpdateDTO);
    @PostMapping("/queryPagePaymentRecord")
    R<Page<PaymentRecordVO>> query(@RequestBody @Validated PageParams<PaymentRecordPageQuery> params);

    @PostMapping("/queryPaymentRecordList")
    R<List<PaymentRecordVO>> queryList(@RequestBody PaymentRecordDTO paymentRecordDTO);

    @GetMapping("/deleteById/{id}")
    R delete(@PathVariable("id") Long id);

    @PostMapping("/settlementCollect")
    R<Boolean> settlementCollect(@RequestBody PaymentRecordDTO paymentRecordDTO);
}
